.TH std::barrier::arrive_and_wait 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::barrier::arrive_and_wait \- std::barrier::arrive_and_wait

.SH Synopsis
   void arrive_and_wait();  \fI(since C++20)\fP

   Atomically decrements the expected count by 1, then blocks at the synchronization
   point for the current phase until the phase completion step of the current phase is
   run. Equivalent to wait(arrive());.

   The behavior is undefined if the expected count for the current phase is zero.

.SH Parameters

   \fI(none)\fP

.SH Return value

   \fI(none)\fP

.SH Exceptions

   Throws std::system_error with an error code allowed for mutex types on error.

.SH Notes

   If the current expected count is decremented to zero in the call to this function,
   the phase completion step is run and this function does not block.

   If the current expected count is zero before calling this function, the initial
   expected count for all subsequent phases is also zero, which means the barrier
   cannot be reused.

.SH Example

    This section is incomplete
    Reason: no example

.SH Category:
     * Todo no example
